package binary;

public class HexDemo {
    public static void main(String[] args) {
        int n=0x2edcf23a;
        int m=0b10010101010110101101011111010;
        System.out.println("2进制n:"+Integer.toBinaryString(n));//2进制输出
        System.out.println("16进制n:"+Integer.toHexString(n));//16进制输出
        System.out.println(n);
        System.out.println("2进制m:"+Integer.toBinaryString(m));
        System.out.println("16进制m:"+Integer.toHexString(m));
        System.out.println(m);


        int i=0b10101;//1+1*2*2+1*2*2*2*2
        System.out.println("2进制i:"+Integer.toBinaryString(i));
        System.out.println("16进制i:"+Integer.toHexString(i));
        System.out.println(i);



        int z=-23;
        System.out.println(Integer.toBinaryString(z));
        System.out.println(z);


    }
}
